package com.hl.sfzy.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 @Data相当于
 @Getter @Setter @RequiredArgsConstructor @ToString @EqualsAndHashCode这5个注解的合集，
 所以在加了@Data注解之后，默认就将callSuper置为false了
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class ProjectException extends RuntimeException{
    private Integer code;
    private String message;
    public ProjectException(){}

    public ProjectException(String message) {
        super(message);
        this.message = message;
    }

    public ProjectException(String message, Integer code) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public ProjectException(String message, Throwable cause, Integer code) {
        super(message, cause);
        this.code = code;
        this.message = message;
    }
}

